﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common;

namespace DataAccess
{
    public class MenusRepository : ConnectionClass
    {
        public MenusRepository()
            : base()
        {
        }

        public IEnumerable<Menu> GetMainMenus(int roleId)
        {
            Role r = new UsersRepository().GetRole(roleId);
            return r.Menus.Where(m => r.UserTypeID == roleId).AsEnumerable().ToList();
        }
    }
}
